
# set history filename gdb_log.txt
# set history save on

define log_on
    # 打开日志
    set logging file $arg0
    set logging overwrite on
    set logging enabled on

    # 关闭输出分页，等价于set height unlimited
    set pagination off

    # 等价于set height 0
    set height unlimited
    # 等价于set width 0
    set width unlimited

    show logging
    show pagination
    show height
    show width
end
document log_on
	log_on logfile
end

define log_off
    set logging enabled off

    # 打开输出分页
    set pagination on

    set height 20
    set width 120

    show logging
    show pagination
    show height
    show width
end

define show_task
	set var $tsk = $arg0
	print $tsk
	print $tsk->comm
	print $tsk->cpus_mask
end
document show_task
	show_task var
end

